package com.sy.springboottest.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.sy.springboottest.pojo.RefDemo;

public interface RefReposity extends CrudRepository<RefDemo, Integer> {
	
    @Query(value = "select * from ref_demo where addr like concat(?1,'%')",nativeQuery = true)
	List<RefDemo> queryByPage(Integer addr,Integer curNum,Integer pageSize);
	
    @Query(value = "select count(1) from ref_demo where addr like concat(?1,'%') ",nativeQuery = true)
	Long queryByCount(Integer addr);
}
